using MicroMsg.Common.Event;
using MicroMsg.Common.Utils;
using MicroMsg.Manager;
using MicroMsg.Resource.@string;
using MicroMsg.Scene;
using MicroMsg.Storage;
using MicroMsg.UI.Page;
using MicroMsg.UI.Util;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Animation;
namespace MicroMsg.UI.UserContrl
{
	public class BlackListView : UserControl
	{
		public class Group<T> : ObservableCollection<T>
		{
			public string Key
			{
				get;
				set;
			}
			public bool HasItems
			{
				get
				{
					return 0 != base.get_Count();
				}
				set
				{
				}
			}
			public Group(string name, IEnumerable<T> items)
			{
				this.Key = name;
				using (IEnumerator<T> enumerator = items.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						T current = enumerator.get_Current();
						base.Add(current);
					}
				}
			}
			public override bool Equals(object value)
			{
				BlackListView.Group<T> group = value as BlackListView.Group<T>;
				return group != null && this.Key.Equals(group.Key);
			}
			public override int GetHashCode()
			{
				return base.GetHashCode();
			}
		}
		private const string TAG = "BlackList:";
		public static IList<BlackListView.Group<Contact>> mListGroup;
		private LongListSelector currentSelector;
		private Dictionary<string, Contact> mDictLinkedContacts;
		private EventWatcher mWatchContactListChange;
		private EventWatcher mWatcherHeadImgAdd;
		internal Grid LayoutRoot;
		internal LongListSelector mListGroupContacts;
		private bool _contentLoaded;
		private void registerEvent()
		{
			if (this.mWatchContactListChange == null)
			{
				this.mWatchContactListChange = new EventWatcher(this, this, new EventHandlerDelegate(this.OnContactChange));
				EventCenter.registerEventWatcher(EventConst.ON_STORAGE_CONTACT_ADD, this.mWatchContactListChange);
				EventCenter.registerEventWatcher(EventConst.ON_STORAGE_CONTACT_DEL, this.mWatchContactListChange);
				EventCenter.registerEventWatcher(EventConst.ON_STORAGE_CONTACT_MODIFY, this.mWatchContactListChange);
				this.mWatcherHeadImgAdd = new EventWatcher(this, null, new EventHandlerDelegate(this.onEventHandlerHeadImgAdd));
				EventCenter.registerEventWatcher(EventConst.ON_MGR_HEAD_IMG_READY, this.mWatcherHeadImgAdd);
			}
		}
		private void unRegisterEvent()
		{
			EventCenter.removeEventWatcher(EventConst.ON_STORAGE_CONTACT_ADD, this.mWatchContactListChange);
			EventCenter.removeEventWatcher(EventConst.ON_STORAGE_CONTACT_DEL, this.mWatchContactListChange);
			EventCenter.removeEventWatcher(EventConst.ON_STORAGE_CONTACT_MODIFY, this.mWatchContactListChange);
			EventCenter.removeEventWatcher(EventConst.ON_MGR_HEAD_IMG_READY, this.mWatcherHeadImgAdd);
			this.mWatchContactListChange = null;
			this.mWatcherHeadImgAdd = null;
		}
		public BlackListView()
		{
			Log.smethod_5("BlackList:", "BlackList start");
			this.InitializeComponent();
			base.add_Loaded(new RoutedEventHandler(this.ControlLoaded));
		}
		private void ControlLoaded(object sender, RoutedEventArgs e)
		{
			Log.smethod_5("BlackList:", "BlackList Loaded");
			this.Init();
		}
		private void initBlackListView()
		{
			this.InitItemSources();
			this.regEventHandForList();
		}
		private void OnContactChange(EventWatcher watcher, BaseEventArgs evtArgs)
		{
			if (evtArgs == null)
			{
				return;
			}
			if (BlackListView.mListGroup == null)
			{
				Log.smethod_5("BlackList:", "exception in OnContactChange:null == mListGroup");
				return;
			}
			if (EventConst.ON_STORAGE_CONTACT_ADD == evtArgs.mEventID)
			{
				Log.smethod_5("BlackList:", "ON_STG_CONTACT_ADD");
				List<Contact> contactListFromEventArg = this.getContactListFromEventArg(evtArgs);
				this.applyAddToConList(contactListFromEventArg);
				return;
			}
			if (EventConst.ON_STORAGE_CONTACT_MODIFY == evtArgs.mEventID)
			{
				Log.smethod_5("BlackList:", "ON_STG_CONTACT_MOD");
				List<Contact> contactListFromEventArg2 = this.getContactListFromEventArg(evtArgs);
				this.applyModToConList(contactListFromEventArg2);
				return;
			}
			if (EventConst.ON_STORAGE_CONTACT_DEL == evtArgs.mEventID)
			{
				Log.smethod_5("BlackList:", "ON_STG_CONTACT_DEL");
				List<Contact> contactListFromEventArg3 = this.getContactListFromEventArg(evtArgs);
				this.applyDelToConList(contactListFromEventArg3);
			}
		}
		private List<Contact> getContactListFromEventArg(BaseEventArgs evtArgs)
		{
			List<Contact> listObject = evtArgs.getListObject<Contact>();
			if (listObject == null)
			{
				return null;
			}
			List<Contact> list = new List<Contact>();
			using (List<Contact>.Enumerator enumerator = listObject.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					Contact current = enumerator.get_Current();
					if (current != null && current.GetType() == typeof(Contact))
					{
						Contact contact = current;
						if (contact != null)
						{
							list.Add(contact);
						}
					}
				}
			}
			return list;
		}
		private void InitItemSources()
		{
			this.mDictLinkedContacts = new Dictionary<string, Contact>();
			List<BlackListView.Group<Contact>> list = new List<BlackListView.Group<Contact>>();
			string groupTitle = ToolFunction.groupTitle;
			for (int i = 0; i < groupTitle.get_Length(); i++)
			{
				list.Add(new BlackListView.Group<Contact>(groupTitle.get_Chars(i).ToString(), new List<Contact>()));
			}
			BlackListView.mListGroup = list.ToObservableCollection<BlackListView.Group<Contact>>();
			this.applyAddToConList(this.getBlackListContacts());
			this.mListGroupContacts.ItemsSource = BlackListView.mListGroup;
		}
		private List<Contact> getBlackListContacts()
		{
			List<Contact> list = new List<Contact>();
			List<Contact> listWithOrder = StorageMgr.contact.getListWithOrder();
			using (List<Contact>.Enumerator enumerator = listWithOrder.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					Contact current = enumerator.get_Current();
					if (ContactMgr.isBlackList(current))
					{
						list.Add(current);
					}
				}
			}
			return list;
		}
		private void applyAddToConList(List<Contact> contactList)
		{
			if (contactList == null)
			{
				StorageMgr.contact.dumpTable();
				return;
			}
			using (List<Contact>.Enumerator enumerator = contactList.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					Contact current = enumerator.get_Current();
					if (this.isContactNeedShow(current))
					{
						if ("fmessage" == current.strUsrName)
						{
							Log.smethod_5("BlackList:", "fmessage Gote");
							return;
						}
						string contactComString = this.getContactComString(current);
						if (BlackListView.mListGroup == null)
						{
							Log.smethod_5("BlackList:", "exception in applyAddToConList:null == mListGroup");
							return;
						}
						char groupHeader = BlackListView.getGroupHeader(current);
						int indexOfGroupList = ToolFunction.getIndexOfGroupList(groupHeader);
						BlackListView.Group<Contact> group = BlackListView.mListGroup.get_Item(indexOfGroupList);
						if (group == null)
						{
							Log.smethod_5("BlackList:", "exception in applyAddToConList:null == group");
							return;
						}
						if (!group.HasItems)
						{
							string arg_A1_0 = group.Key;
							List<Contact> list = new List<Contact>();
							list.Add(current);
							BlackListView.Group<Contact> group2 = new BlackListView.Group<Contact>(arg_A1_0, list);
							BlackListView.mListGroup.set_Item(indexOfGroupList, group2);
						}
						lock (group)
						{
							int num = 0;
							using (IEnumerator<Contact> enumerator2 = group.GetEnumerator())
							{
								while (enumerator2.MoveNext())
								{
									Contact current2 = enumerator2.get_Current();
									if (current2.strUsrName != null && current.strUsrName != null)
									{
										int num2 = current2.strUsrName.CompareTo(current.strUsrName);
										if (num2 != 0)
										{
											string text;
											if (current2.strRemarkPYInitial != null && current2.strRemarkPYInitial.get_Length() != 0)
											{
												text = current2.strRemarkPYInitial;
											}
											else
											{
												text = current2.strPYInitial;
											}
											if (current2.strPYInitial != null && current.strPYInitial != null)
											{
												num2 = contactComString.CompareTo(text);
											}
											if (0 <= num2)
											{
												num++;
												continue;
											}
										}
										else
										{
											num = -2;
										}
										break;
									}
								}
							}
							if (-2 != num)
							{
								group.Insert(num, current);
							}
						}
					}
				}
			}
			ContactListItem.ShowInViewItemsImg();
		}
		private void applyModToConList(List<Contact> contactList)
		{
			if (contactList == null)
			{
				return;
			}
			using (List<Contact>.Enumerator enumerator = contactList.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					Contact current = enumerator.get_Current();
					if (this.isContactNeedShow(current))
					{
						this.getContactComString(current);
						if (BlackListView.mListGroup == null)
						{
							Log.smethod_5("BlackList:", "exception in applyModToConList:null == mListGroup");
							return;
						}
						char groupHeader = BlackListView.getGroupHeader(current);
						int num = ToolFunction.getIndexOfGroupList(groupHeader);
						BlackListView.Group<Contact> group = BlackListView.mListGroup.get_Item(num);
						if (group == null)
						{
							Log.smethod_5("BlackList:", "exception in applyModToConList:null == group");
							return;
						}
						bool flag = false;
						lock (group)
						{
							int num2 = 0;
							using (IEnumerator<Contact> enumerator2 = group.GetEnumerator())
							{
								while (enumerator2.MoveNext())
								{
									Contact current2 = enumerator2.get_Current();
									int num3 = current2.strUsrName.CompareTo(current.strUsrName);
									if (num3 == 0)
									{
										flag = true;
										if (!ContactMgr.isBlackList(current))
										{
											this.removeItemInGroup(num, num2);
										}
										else
										{
											if (this.isTwoContactInSamePlace(current, current2))
											{
												group.set_Item(num2, current);
											}
										}
										break;
									}
									num2++;
								}
							}
						}
						if (!flag)
						{
							num = 0;
							using (IEnumerator<BlackListView.Group<Contact>> enumerator3 = BlackListView.mListGroup.GetEnumerator())
							{
								while (enumerator3.MoveNext())
								{
									BlackListView.Group<Contact> current3 = enumerator3.get_Current();
									int num4 = 0;
									using (IEnumerator<Contact> enumerator4 = current3.GetEnumerator())
									{
										while (enumerator4.MoveNext())
										{
											Contact current4 = enumerator4.get_Current();
											int num5 = current4.strUsrName.CompareTo(current.strUsrName);
											if (num5 == 0)
											{
												flag = true;
												if (!ContactMgr.isBlackList(current))
												{
													this.removeItemInGroup(num, num4);
												}
												else
												{
													if (this.isTwoContactInSamePlace(current, current4))
													{
														current3.set_Item(num4, current);
													}
												}
												break;
											}
											num4++;
										}
									}
									num++;
								}
							}
						}
						if (!flag)
						{
							List<Contact> list = new List<Contact>();
							list.Add(current);
							this.applyAddToConList(list);
						}
					}
				}
			}
			ContactListItem.ShowInViewItemsImg();
		}
		private void removeItemInGroup(int nSourceIndex, int nGroupIndex)
		{
			if (BlackListView.mListGroup == null || nSourceIndex < 0 || nSourceIndex > BlackListView.mListGroup.get_Count() - 1)
			{
				return;
			}
			BlackListView.Group<Contact> group = BlackListView.mListGroup.get_Item(nSourceIndex);
			if (group != null && nGroupIndex >= 0 && nGroupIndex <= group.get_Count() - 1)
			{
				if (group.get_Count() != 0)
				{
					if (1 == group.get_Count())
					{
						BlackListView.mListGroup.set_Item(nSourceIndex, null);
						BlackListView.mListGroup.set_Item(nSourceIndex, new BlackListView.Group<Contact>(group.Key, new List<Contact>()));
						return;
					}
					group.RemoveAt(nGroupIndex);
					group.set_Item(group.get_Count() - 1, group.get_Item(group.get_Count() - 1));
				}
				return;
			}
		}
		private void applyDelToConList(List<Contact> contactList)
		{
			if (contactList == null)
			{
				return;
			}
			using (List<Contact>.Enumerator enumerator = contactList.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					Contact current = enumerator.get_Current();
					if (this.isContactNeedShow(current))
					{
						this.getContactComString(current);
						if (BlackListView.mListGroup == null)
						{
							Log.smethod_5("BlackList:", "exception in applyDelToConList:null == mListGroup");
							return;
						}
						char groupHeader = BlackListView.getGroupHeader(current);
						int indexOfGroupList = ToolFunction.getIndexOfGroupList(groupHeader);
						BlackListView.Group<Contact> group = BlackListView.mListGroup.get_Item(indexOfGroupList);
						if (group == null)
						{
							Log.smethod_5("BlackList:", "exception in applyDelToConList:null == group");
							return;
						}
						lock (group)
						{
							using (IEnumerator<Contact> enumerator2 = group.GetEnumerator())
							{
								while (enumerator2.MoveNext())
								{
									Contact current2 = enumerator2.get_Current();
									if (current2.strUsrName != null && current.strUsrName != null)
									{
										int num = current2.strUsrName.CompareTo(current.strUsrName);
										if (num == 0)
										{
											group.Remove(current2);
											break;
										}
									}
								}
							}
						}
					}
				}
			}
			ContactListItem.ShowInViewItemsImg();
		}
		private void ApplyChangeToDataSouces(ObservableCollection<Contact> contactList)
		{
		}
		private bool isContactNeedShow(Contact newContact)
		{
			if (newContact != null && newContact.strUsrName != null && (!ToolFunction.checkIsStrSystemPlugin(newContact.strUsrName) || newContact.strUsrName.CompareTo("fmessage") == 0) && !newContact.strUsrName.EndsWith("@chatroom"))
			{
				if (ContactMgr.UserType.UserTypeNormal == ContactMgr.getUserType(newContact.strUsrName))
				{
					return true;
				}
			}
			return false;
		}
		private string getContactComString(Contact newContact)
		{
			string result = newContact.strPYInitial;
			if (newContact.strRemark != null && newContact.strRemark.get_Length() != 0)
			{
				if (newContact.strRemarkPYInitial == null || newContact.strRemarkPYInitial.get_Length() == 0)
				{
					newContact.strRemarkPYInitial = SortStringsByAlpha.ConvertStringToPinyinInitial(newContact.strRemark);
				}
				result = newContact.strRemarkPYInitial;
			}
			else
			{
				if (newContact.strPYInitial == null || newContact.strPYInitial.get_Length() == 0)
				{
					newContact.strPYInitial = SortStringsByAlpha.ConvertStringToPinyinInitial(newContact.strNickName);
					result = newContact.strPYInitial;
				}
			}
			return result;
		}
		private bool isTwoContactInSamePlace(Contact aCon, Contact bCon)
		{
			bool flag = aCon.strRemarkPYInitial == null || 0 == aCon.strRemarkPYInitial.get_Length();
			bool flag2 = bCon.strRemarkPYInitial == null || 0 == bCon.strRemarkPYInitial.get_Length();
			if (flag != flag2)
			{
				return false;
			}
			if (!flag)
			{
				return aCon.strRemarkPYInitial == bCon.strRemarkPYInitial;
			}
			bool flag3 = aCon.strPYInitial == null || 0 == aCon.strPYInitial.get_Length();
			bool flag4 = bCon.strPYInitial == null || 0 == bCon.strPYInitial.get_Length();
			return flag3 == flag4 && (flag3 || aCon.strPYInitial == bCon.strPYInitial);
		}
		private static char getGroupHeader(Contact contact)
		{
			if (contact == null)
			{
				return '#';
			}
			if (ToolFunction.checkIsStrSystemPlugin(contact.strUsrName))
			{
				return '@';
			}
			if (contact.strRemarkPYInitial != null && contact.strRemarkPYInitial.get_Length() != 0)
			{
				return contact.strRemarkPYInitial.get_Chars(0);
			}
			if (contact.strPYInitial == null || contact.strPYInitial.get_Length() == 0)
			{
				return '#';
			}
			if (!ToolFunction.groupTitle.Contains(contact.strPYInitial.get_Chars(0).ToString()))
			{
				return '#';
			}
			return contact.strPYInitial.get_Chars(0);
		}
		private void onEventHandlerHeadImgAdd(EventWatcher watcher, BaseEventArgs evtArgs)
		{
			List<string> listObject = evtArgs.getListObject<string>();
			if (listObject == null)
			{
				return;
			}
			using (List<string>.Enumerator enumerator = listObject.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					string current = enumerator.get_Current();
					if (current != null && current.GetType() == typeof(string))
					{
						this._updateUserHead(current);
					}
				}
			}
		}
		private void _updateUserHead(string strUserName)
		{
			ContactListItem.RefreshHeadImgInView(strUserName);
		}
		public void Init()
		{
			this.registerEvent();
			this.initBlackListView();
		}
		public void UnInit()
		{
			this.unRegisterEvent();
			BlackListView.mListGroup = null;
		}
		private void MenuItem_Click(object sender, RoutedEventArgs e)
		{
			MenuItem menuItem = sender as MenuItem;
			Contact contact_ = menuItem.get_Tag() as Contact;
			ContactMgr.operationSetBlackList(contact_, false);
			ServiceCenter.sceneNewSync.doScene(4, syncScene.MM_NEWSYNC_SCENE_OTHER);
		}
		private void regEventHandForList()
		{
		}
		private void ContactListItem_ItemClick(object sender, object object_0)
		{
			Contact contact = object_0 as Contact;
			this.GoToContactDetailPage(contact);
		}
		public void GoToContactDetailPage(Contact contact)
		{
			if (ToolFunction.checkIsStrSystemPlugin(contact.strUsrName))
			{
				if (contact.strUsrName.CompareTo("fmessage") == 0)
				{
					ToolFunction.GotoPageForUserControl("/Source/UI/Contact/FriendsIntroducePluginView.xaml", null, false);
					return;
				}
			}
			else
			{
				ContactDetailViewForAll.GotoContactDitailView(strings.Set_BlackList_Title, strings.Set_BlackList_ViewDetail, contact, ContactDetailFromType.FROM_MMCONTACT, false);
			}
		}
		public ApplicationBar GetApplicationBar()
		{
			return null;
		}
		private void LongListSelector_GroupViewOpened(object sender, GroupViewOpenedEventArgs e)
		{
			PhoneApplicationFrame phoneApplicationFrame = Application.get_Current().get_RootVisual() as PhoneApplicationFrame;
			BasePage basePage = phoneApplicationFrame.get_Content() as BasePage;
			if (basePage != null && basePage.get_ApplicationBar() != null)
			{
				basePage.get_ApplicationBar().set_IsVisible(false);
			}
			this.currentSelector = (sender as LongListSelector);
			if (this.currentSelector != null && e != null && e.ItemsControl != null)
			{
				QuadraticEase quadraticEase = new QuadraticEase();
				quadraticEase.set_EasingMode(0);
				IEasingFunction easingFunction = quadraticEase;
				Storyboard storyboard = new Storyboard();
				ItemsControl itemsControl = e.ItemsControl;
				using (IEnumerator<object> enumerator = itemsControl.get_Items().GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						object current = enumerator.get_Current();
						UIElement uIElement = itemsControl.get_ItemContainerGenerator().ContainerFromItem(current) as UIElement;
						if (uIElement != null)
						{
							Border border = VisualTreeHelper.GetChild(uIElement, 0) as Border;
							if (border != null)
							{
								DoubleAnimationUsingKeyFrames doubleAnimationUsingKeyFrames = new DoubleAnimationUsingKeyFrames();
								EasingDoubleKeyFrame easingDoubleKeyFrame = new EasingDoubleKeyFrame();
								easingDoubleKeyFrame.set_KeyTime(TimeSpan.FromMilliseconds(0.0));
								easingDoubleKeyFrame.set_Value(-90.0);
								easingDoubleKeyFrame.set_EasingFunction(easingFunction);
								EasingDoubleKeyFrame easingDoubleKeyFrame2 = new EasingDoubleKeyFrame();
								easingDoubleKeyFrame2.set_KeyTime(TimeSpan.FromMilliseconds(1000.0));
								easingDoubleKeyFrame2.set_Value(0.0);
								easingDoubleKeyFrame2.set_EasingFunction(easingFunction);
								doubleAnimationUsingKeyFrames.get_KeyFrames().Add(easingDoubleKeyFrame);
								doubleAnimationUsingKeyFrames.get_KeyFrames().Add(easingDoubleKeyFrame2);
								Storyboard.SetTargetProperty(doubleAnimationUsingKeyFrames, new PropertyPath(PlaneProjection.RotationXProperty));
								Storyboard.SetTarget(doubleAnimationUsingKeyFrames, border.get_Projection());
								storyboard.get_Children().Add(doubleAnimationUsingKeyFrames);
							}
						}
					}
				}
				storyboard.Begin();
				return;
			}
		}
		private void LongListSelector_GroupViewClosing(object sender, GroupViewClosingEventArgs e)
		{
			if (sender != null && e != null)
			{
				e.Cancel = true;
				if (e.SelectedGroup != null)
				{
					this.currentSelector.ScrollToGroup(e.SelectedGroup);
				}
				base.get_Dispatcher().BeginInvoke(delegate
				{
					QuadraticEase quadraticEase = new QuadraticEase();
					quadraticEase.set_EasingMode(0);
					IEasingFunction easingFunction = quadraticEase;
					Storyboard storyboard = new Storyboard();
					ItemsControl itemsControl = e.ItemsControl;
					if (itemsControl == null)
					{
						return;
					}
					using (IEnumerator<object> enumerator = itemsControl.get_Items().GetEnumerator())
					{
						while (enumerator.MoveNext())
						{
							object current = enumerator.get_Current();
							UIElement uIElement = itemsControl.get_ItemContainerGenerator().ContainerFromItem(current) as UIElement;
							if (uIElement != null)
							{
								Border border = VisualTreeHelper.GetChild(uIElement, 0) as Border;
								if (border != null)
								{
									DoubleAnimationUsingKeyFrames doubleAnimationUsingKeyFrames = new DoubleAnimationUsingKeyFrames();
									EasingDoubleKeyFrame easingDoubleKeyFrame = new EasingDoubleKeyFrame();
									easingDoubleKeyFrame.set_KeyTime(TimeSpan.FromMilliseconds(0.0));
									easingDoubleKeyFrame.set_Value(0.0);
									easingDoubleKeyFrame.set_EasingFunction(easingFunction);
									EasingDoubleKeyFrame easingDoubleKeyFrame2 = new EasingDoubleKeyFrame();
									easingDoubleKeyFrame2.set_KeyTime(TimeSpan.FromMilliseconds(300.0));
									easingDoubleKeyFrame2.set_Value(90.0);
									easingDoubleKeyFrame2.set_EasingFunction(easingFunction);
									doubleAnimationUsingKeyFrames.get_KeyFrames().Add(easingDoubleKeyFrame);
									doubleAnimationUsingKeyFrames.get_KeyFrames().Add(easingDoubleKeyFrame2);
									Storyboard.SetTargetProperty(doubleAnimationUsingKeyFrames, new PropertyPath(PlaneProjection.RotationXProperty));
									Storyboard.SetTarget(doubleAnimationUsingKeyFrames, border.get_Projection());
									storyboard.get_Children().Add(doubleAnimationUsingKeyFrames);
								}
							}
						}
					}
					storyboard.add_Completed(new EventHandler(this._swivelHide_Completed));
					storyboard.Begin();
				});
				PhoneApplicationFrame phoneApplicationFrame = Application.get_Current().get_RootVisual() as PhoneApplicationFrame;
				BasePage basePage = phoneApplicationFrame.get_Content() as BasePage;
				if (basePage != null && basePage.get_ApplicationBar() != null)
				{
					basePage.get_ApplicationBar().set_IsVisible(true);
				}
				return;
			}
		}
		private void _swivelHide_Completed(object sender, EventArgs e)
		{
			if (this.currentSelector != null)
			{
				this.currentSelector.CloseGroupView();
				this.currentSelector = null;
			}
		}
		public void CustomeMizeListItem(object sender, object object_0)
		{
			if (sender != null && sender is ContactListItem)
			{
				ContactListItem contactListItem = sender as ContactListItem;
				contactListItem.mConItemType = ContactsViewType.CONTACT_VIEW_BLACKLIST;
				contactListItem.checkBoxChoosen.set_Visibility(1);
				contactListItem.ChatEntryLayout.set_Visibility(1);
				return;
			}
		}
		~BlackListView()
		{
			BlackListView.mListGroup = null;
		}
		[DebuggerNonUserCode]
		public void InitializeComponent()
		{
			if (this._contentLoaded)
			{
				return;
			}
			this._contentLoaded = true;
			Application.LoadComponent(this, new Uri("/MicroMsg;component/Source/UI/Setting/BlackListView.xaml", 2));
			this.LayoutRoot = (Grid)base.FindName("LayoutRoot");
			this.mListGroupContacts = (LongListSelector)base.FindName("mListGroupContacts");
		}
	}
}
